import About from "../views/About.vue";
import Home from "../views/Home.vue";
import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/about",
    name: "About",
    // 路由级代码分割，生成单独的chunk (about.[hash].js)
    // 当路由被访问时才会加载对应组件
    component: About,
  },
  {
    path: "/shaders",
    name: "Shaders",
    component: () => import("../views/ShaderPage.vue"),
  },
  {
    path: "/shader-editor",
    name: "ShaderEditor",
    component: () => import("../views/ShaderEditor.vue"),
  },
  {
    path: "/panorama",
    name: "Panorama",
    component: () => import("../views/Panorama.vue"),
  },
  

];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
